/**  默认基金排名列表 **/
"use strict";

module.exports = (app) => {
  const { STRING, INTEGER, FLOAT, DATE } = app.Sequelize;

  const FundDefaultRankings = app.model.define("fund_default_rankings", {
    id: { type: INTEGER, primaryKey: true, autoIncrement: true },
    fund_code: STRING(7),
    fund_name: STRING(36),
    networth: FLOAT, // 净值
    networth_total: FLOAT, // 累计全部净值
    day_growth: FLOAT, // 日涨幅
    last_growth_7: FLOAT, // 7天涨幅
    last_growth_30: FLOAT,
    last_growth_60: FLOAT,
    last_growth_90: FLOAT,
    last_growth_360: FLOAT,
    last_growth_720: FLOAT,
    last_growth_1080: FLOAT,
    last_growth_year: FLOAT, // 近年来
    last_growth_all: FLOAT, // 成立以来
    creatTimeLimit: STRING(10), // 成立时间
    add_time: STRING(10),
    created_at: DATE,
    updated_at: DATE,
    deleted_at: DATE,
  });

  return FundDefaultRankings;
};
